Index Property (Recipient Object)
The Index
property returns the index number of this Recipient object within the
Recipients collection. Read-only.
Syntax
objRecipient.Index
Data Type
Long
Remarks
The index
number indicates an index within the array of Recipients collection object.
An index
value should not be considered to be a static value that remains constant for
the duration of a session. The index can change whenever an update occurs to a
parent object, such as the message or folder.
Example
' from the sample function Recipients_NextItem
' after some
similar validation...
If
iRecipCollIndex >= objRecipColl.Count Then
iRecipCollIndex = objRecipColl.Count
MsgBox
"Already at end of recipient list"
Exit Function
End If
' index is
< count; can be incremented by 1
iRecipCollIndex = iRecipCollIndex + 1
Set
objOneRecip = objRecipColl.Item(iRecipCollIndex)
' from the sample function Recipient_Index
If
objOneRecip Is Nothing Then
MsgBox
"must first select a recipient"
Exit
Function
End If
MsgBox
"Recipient index = " & objOneRecip.Index
See Also
Count Property (Recipients Collection), Item Property (Recipients
Collection)